Image data security has recently become an important issue. An image is generally a two-dimensional data. In accordance with which, a one-dimensional signal or two-dimensional image may need encryption in many applications for security reasons. Also, encryption of memory, which may comprise one or more images, can be considered. Furthermore, optical security and encryption methods using random phase encoding have been proposed recently, see generally “Optical pattern recognition for validation and security verification”, by B. Javidi and J. L. Horner, Opt. Eng. 33, 1752–1756 (1994). Also see, “Experimental demonstration of the random phase encoding technique for image encryption and security verification”, by B. Javidi, G. Zhang and J. Li, Optical Engineering, 35, 2506–2512, 1996; “Fault tolerance properties of a double phase encoding encryption technique”, by B. Javidi, A. Sergent, G. Zhang, and L. Guibert, Optical Engineering, 36(4), 992–998, 1997; “Practical image encryption scheme by real-valued data”, by Yang, H.-G., and E.-S. Kim, Optical Engineering, 35(9), 2473–2478, 1996; “Random phase encoding for optical security, by Wang, R. K., I. A. Watson, and C. Chatwin”, Optical Engineering, 35(9), 2464–2469, 1996; “Optical implementation of image encryption using random phase encoding”, by Neto, L. G. Y. Sheng, Optical Engineering, 35(9), 2459–2463, 1996; and “Optical image encryption using input and Fourier plane random phase encoding” by Ph. Refregier and B. Javidi, Optics Letters, Vol. 20, 767–770, 1995.